package com.example.springtrans.service;

import com.example.springtrans.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service

public class UserService {
    @Autowired
    private UserMapper userMapper;
    @Transactional(propagation = Propagation.NESTED)
    public Integer insertUser(String userName, String password) {
        return userMapper.insertUser(userName, password);
    }
}
